<?php
include_once('common/header.php');
$objOffline 	= new Offline();
$objBehaviour	= new Behaviour();
$intOfflineId	= $objRequest->getParam('offlineid', 0);
$arrRow			= $objOffline->get($intOfflineId);
$arrOjoin		= $objOffline->getOjoin($AppUI->id, $intOfflineId);
if($AppUI->id > 0) {
	$objBehaviour->updateRead($AppUI->id,$intOfflineId,4);
}
if(isset($arrRow) && 
	( abs($arrRow['statuses']) < 2 ||
	  ($arrRow['statuses'] == -2 && ($arrRow['userid'] == $AppUI->id || (isset($arrOjoin) && $arrOjoin)))
	)
) {
	$this->view->join		= $arrOjoin;
	$this->view->row 		= $arrRow;
	$this->view->arrDefault	= $arrDefault;
	include_once('offline/comment.php');
	include_once('offline/box-registed.php');
	include_once('offline/box-accept.php');
} else {
	$strRefer	= isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : LINK_OFFLINE;
	Vfriend_Function::setMsg($arrMessage[6]);
	Vfriend_Function::redirect($strRefer);
}
?>